﻿@{
    ViewBag.Title = "商品管理";
    ViewBag.NavTitle = "商品管理";
    Layout = "~/Views/Shared/_UsersCenterLayout.cshtml";
}
@using MvcMall.Framework.MvcPager;
@using MvcMall.Portal.Controllers.Stores.ViewModels;
@model PagedList<StoreGoodDtoModel>
<div class="right_box">
    <div class="right_box_map">
        商品管理
    </div>
    <div style="line-height: 50px; float: right;">
        <p class="avatar_btn">
            @Html.ActionLink("新增商品", "PublishGoods_Step1", "Stores", null, null)
        </p>
    </div>
    <table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
        cellpadding="0">
        <tr height="30" class="tab_title">
            <td>
            </td>
            <td>
                商品名称
            </td>
            <td>
                商品分类
            </td>
            <td>
                品牌
            </td>
            <td>
                价格
            </td>
            <td>
                库存
            </td>
            <td>
                上架
            </td>
            <td>
                推荐
            </td>
            <td>
                操作
            </td>
        </tr>
        @foreach (var item in Model)
        {
            <tr height="40" class="tab_td1" onmouseover="this.className='tab_td2'" onmouseout="this.className='tab_td1'">
                <td>
                    <img src="@item.GoodsThumb" />
                </td>
                <td>
                    @item.GoodsName
                </td>
                <td>
                    @item.GoodsCatName
                </td>
                <td>
                    @item.GoodsBrandName
                </td>
                <td>
                    @item.StorePrice
                </td>
                <td>
                    @item.GoodsNumber
                </td>
                <td>
                    @if (item.IsPublish)
                    {
                        <text>是</text>
                    }
                    else
                    {
                        <text>否</text> 
                    }
                </td>
                <td>
                    @if (item.IsPromoted)
                    {
                        <text>是</text>
                    }
                    else
                    {
                        <text>否</text> 
                    }
                </td>
                <td>
                    @Html.ActionLink("编辑", "EditGoods", "Stores", new { @goodsId = item.Id }, null)
                </td>
            </tr>
        }
    </table>
    @Html.Pager(Model, new PagerOptions { PageIndexParameterName = "pageIndex", NumericPagerItemWrapperFormatString = "<span class=\"cpb\">{0}</span>" })
</div>
